# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=FFI-CheckLib
pkgname=perl-${_realname}
pkgver=0.25
pkgrel=1
pkgdesc="Check that a library is available for FFI"
arch=('any')
url="https://metacpan.org/release/FFI-CheckLib"
groups=('perl-modules')
depends=('perl')
checkdepends=('perl-Test-Exit' 'perl-Test2-Suite')
license=('PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/${_realname}-${pkgver}.tar.gz")
sha256sums=('eb36b9a7cff1764a65b1b77e01e92c26207c558a3f986d0d17d2b110fa366ba4')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
